// 所有的面经相关的请求，都放到这里

import request from '@/utils/request'

// 获取面经列表数据
export function articleListAPI (params) {
  // return request.get('/admin/interview/query', {
  //   params: params
  // })
  return request({
    method: 'GET',
    url: '/admin/interview/query',
    params: params
  })
}
// 添加面经
export function createArticleAPI (data) {
  return request.post('/admin/interview/create', data)
}

// 删除面经
export function removeArticleAPI (id) {
  return {
    method: 'DELETE',
    url: '/admin/interview/remove',
    data: { id }
  }
}

// 获取单个面经详情
export function articleAPI (id) {
  return request({
    url: '/admin/interview/show',
    params: {
      id: id
    }
  })
}

export const updateArticleAPI = data => {
  return request.put('/admin/interview/update', data)
}
